#define _GNU_SOURCE
#include "app_pool.h"
#include "log.h"
#include "unistd.h"


void *task_func(void *arg)
{	log_info("当前分支线程tid:%d",gettid());
	log_info("任务执行内容:%s",arg);
	return NULL;
}

int main(int argc, char const *argv[])
{
	 //1 初始化线程池
	 app_pool_init(5);

	log_info("当前主线程tid:%d",gettid());
	 //2 向线程池中添加任务
	 app_pool_register_task(task_func,(void *)"atguigu");

	 // 延迟
	 sleep(10);
	 //3 销毁线程池
	 app_pool_destroy();


	return 0;
}
